<?php
/**
 * Created by PhpStorm.
 * User: varcher
 * Date: 2019/12/16
 * Time: 17:11
 */

require_once (__DIR__ .'/../../basic/vendor/autoload.php');
require_once "ObserverTxCloudBalance.php";
require_once "ObserverTxCloudSms.php";
use TencentCloud\Common\Credential;
use TencentCloud\Common\Exception\TencentCloudSDKException;


abstract class ObserverTxCloud extends Observer
{
    protected $cred               =   null;

    public function __construct(...$args)
    {
        try {
            $secretID   =   $args[0];
            $secretKey  =   $args[1];
            $this->cred =   new Credential($secretID, $secretKey);
            if (count($args)!= 2) {
                throw new Exception("Args Error! 2 Required".count($args)."presented.");
            }
        } catch (TencentCloudSDKException $e) {
            Yii::error("Contruct TxCloud Interface Failed. Reason = " . $e);
            return "";
        }
        catch (Exception $e) {
        }
    }


}